// ==================================================================================
// Shared Genomics Project MPI Codebase
// Version 1.0 30/04/2010
//
// (c) 2010 University of Manchester all rights reserved
//
// This file is distributed under the GNU General Public License, Version 2.  
// Please see the file COPYING.txt for more details
// ==================================================================================

#ifndef _BITSTRING_UNPACK_H_
#define _BITSTRING_UNPACK_H_

#ifdef __cplusplus
extern "C" {
#endif

/*!
\file
\ingroup	gio
\brief		BitString unpack methods
*/

/*! 
\brief Unpack a bit string into its full byte-level representation
\details
	Data access for array data is approximately 7% faster than similar operations
	using bit strings. The down-side to this optimisation method is that memory
	requirements for the statistical code increases significantly.
	As the NIBHI core has only 2 Gb of RAM, we went for the BitString methodology to 
	encode the SNP allelic data.
\param [in] data BitString to unpack
\param [in] nRows No. bitstring records
\param [in] nCols No. bits per bitstring record
\param [in] recordSizeInBytes bitstring record size in bytes
*/
char* bitstring_unpack(char *data, int nRows, int nCols, int recordSizeInBytes);

#ifdef __cplusplus
}
#endif

#endif // _BITSTRING_UNPACK_H_
